package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.OrderByUserId;
import cn.wolfcode.trip.base.domain.ProductByUser;
import cn.wolfcode.trip.base.mapper.OrderByUserIdMapper;
import cn.wolfcode.trip.base.query.OrderQuery;
import cn.wolfcode.trip.base.service.IOrderByUserService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class OrderByUserServiceImpl implements IOrderByUserService {

    @Autowired
    private OrderByUserIdMapper orderByUserIdMapper;

    @Override
    public PageInfo query(OrderQuery qo) {
        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize());
        List<OrderByUserId> list = orderByUserIdMapper.selectByUserId(qo);
        return new PageInfo(list);
    }
}
